<%@page import="classes.User"%>
<%@page import="classes.AccountManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>


<form action="addSubjects.jsp" method="post" enctype="multipart/form-data">
		
	<p>Subject Name: <input type="text" name="subjectName"></p>

	<p>Select lecturers</p>
	
	<%	
		
		out.println("<SELECT NAME=\"lecturers\" SIZE=\"4\" multiple=\"multiple\" >");
			
		AccountManager accManager = (AccountManager)application.getAttribute(AccountManager.ACCOUNTMANAGER);
		User[] users = accManager.getUsersByStatus("1");
		
		for(int i=0; i<users.length; i++){
			out.println("<OPTION> " + users[i].getUserName() + " " + users[0].getName() + " " + users[i].getSurName());
		}
		out.println("</SELECT>");

		
	%>

	<p>Sylabus file: <input type="file" name="sylabus"></p>
	<input type="submit" value="add">
</form>



<a href="subjects.jsp">go back</a>

</body>
</html>